﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace PhilipsChannelOrder.Models
{
    public class ChannelNode : IComparable
    {
        public int PresetNumber { get; set; }
        public int OldPresetNumber { get; set; }
        public string Name { get; set; }
        public XNode Broadcast { get; set; }

        public int CompareTo(object obj)
        {
            ChannelNode cn = obj as ChannelNode;
            if (cn != null)
                return PresetNumber.CompareTo(cn.PresetNumber);
            else
                return -1;
        }
    }
}
